package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.VendorsItemsMapper;
import com.ruoyi.system.domain.VendorsItems;
import com.ruoyi.system.service.IVendorsItemsService;

/**
 * 供应商存货Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-16
 */
@Service
public class VendorsItemsServiceImpl implements IVendorsItemsService 
{
    @Autowired
    private VendorsItemsMapper vendorsItemsMapper;

    /**
     * 查询供应商存货
     * 
     * @param vendorId 供应商存货主键
     * @return 供应商存货
     */
    @Override
    public VendorsItems selectVendorsItemsByVendorId(String vendorId)
    {
        return vendorsItemsMapper.selectVendorsByitemId(vendorId);
    }

    /**
     * 查询供应商存货列表
     * 
     * @param vendorsItems 供应商存货
     * @return 供应商存货
     */
    @Override
    public List<VendorsItems> selectVendorsItemsList(VendorsItems vendorsItems)
    {
        return vendorsItemsMapper.selectVendorsItemsList(vendorsItems);
    }

    /**
     * 新增供应商存货
     * 
     * @param vendorsItems 供应商存货
     * @return 结果
     */
    @Override
    public int insertVendorsItems(VendorsItems vendorsItems)
    {
        return vendorsItemsMapper.insertVendorsItems(vendorsItems);
    }

    /**
     * 修改供应商存货
     * 
     * @param vendorsItems 供应商存货
     * @return 结果
     */
    @Override
    public int updateVendorsItems(VendorsItems vendorsItems)
    {
        return vendorsItemsMapper.updateVendorsItems(vendorsItems);
    }

    /**
     * 批量删除供应商存货
     * 
     * @param vendorIds 需要删除的供应商存货主键
     * @return 结果
     */
    @Override
    public int deleteVendorsItemsByVendorIds(String[] vendorIds)
    {
        return vendorsItemsMapper.deleteVendorsItemsByVendorIds(vendorIds);
    }

    /**
     * 删除供应商存货信息
     * 
     * @param vendorId 供应商存货主键
     * @return 结果
     */
    @Override
    public int deleteVendorsItemsByVendorId(String vendorId)
    {
        return vendorsItemsMapper.deleteVendorsItemsByVendorId(vendorId);
    }
}
